package com.study.service.serviceImpl;

import com.github.pagehelper.PageHelper;
import com.study.dao.AppInforDao;
import com.study.entity.AppInfo;
import com.study.service.AppInforService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Administrator on 2017/10/18.
 */
@Service
public class AppInforServiceImpl implements AppInforService {
    @Autowired
    private AppInforDao dao;
    @Override
    public AppInfo findOneById(Integer id) {
        return dao.findOneById(id);
    }

    @Override
    public List<AppInfo> findList(AppInfo appInfo) {

        return dao.findList(appInfo);
    }

    @Override
    public int updateById(Integer id) {
        return 0;
    }

    @Override
    public int saveById(AppInfo appInfo) {
        return 0;
    }

    @Override
    public int deleteById(Integer id) {
        return 0;
    }

    @Override
    public List<AppInfo> findAllList() {
        return dao.findAllList();
    }

    @Override
    public List<AppInfo> findList(AppInfo appInfo, Integer page, Integer size) {
        PageHelper.startPage(page,size);//shiyong fenyechajia
        return dao.findList(appInfo);
    }

    @Override
    public void addAppInfo(AppInfo appInfo) {
        dao.addAppInfo(appInfo);
    }
}
